package com.goodving.guli.bt.lua;

import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.widget.ImageView;

import com.goodving.guli.bt.ui.C1894O;
import com.nostra13.universalimageloader.core.assist.LoadedFrom;
import com.nostra13.universalimageloader.core.display.BitmapDisplayer;
import com.nostra13.universalimageloader.core.imageaware.ImageAware;
import com.nostra13.universalimageloader.core.imageaware.ImageViewAware;

/**
 * Created by john on 2015/12/8.
 */
public class C1318i implements BitmapDisplayer {
    final /* synthetic */ C1226h f6693a;

    public C1318i(C1226h c1226h) {
        this.f6693a = c1226h;
    }

    @SuppressLint({"NewApi"})
    public void display (Bitmap bitmap, ImageAware c3079a, LoadedFrom  c3056g) { // m11546a //C3079a // C3056g
        if (c3079a instanceof ImageViewAware ) { // C3081b
            Bitmap a = C1894O.m15165a(bitmap);
            ImageView imageView = (ImageView) c3079a.getWrappedView();
            if (a != null && imageView != null) {
                imageView.setBackground(new BitmapDrawable(imageView.getResources(), a));
                return;
            }
            return;
        }
        throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected.");
    }
}
